<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑自由行拼游</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
    <!--<script src="{$Think.config.httpFlag}{$Think.config.google_map_url}" async="async"></script>-->
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <style>
        #admin dl{z-index:99999;}
        .pro_li,.trip_li{
            border-bottom: 1px dashed #efefef;
        }
        .carAndTicketCurrency{
            text-align: left;
            padding-left:0;
            padding-right:0;
            position: absolute;
            top: 10px;
            left: 520px;
        }
        .busySeason{
            color:red;
        }
    </style>

</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
    <legend>编辑当前用户拼团信息</legend>
</fieldset>
<form class="layui-form" id="admin">
    <!--手机区号-->
    <div class="layui-form-item">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-block" style="max-width:300px;">
            <input style="float: left;width: 30%" name="country_code" lay-verify="country_code" autocomplete="off" placeholder="区号" class="layui-input" type="text" {notempty name="$info.country_code"}value="{$info.country_code}"{/notempty}>
            <input style="width: 70%;margin-left: 30%" name="phone" lay-verify="phone" autocomplete="off" placeholder="手机号" class="layui-input" type="text" {notempty name="$info.phone"}value="{$info.phone}"{/notempty}>
        </div>
    </div>
    <!--手机区号-->
    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block" style="max-width:300px;">
            <input name="email" lay-verify="email" autocomplete="off" placeholder="请输入邮箱" class="layui-input" type="text" {notempty name="$info.email"}value="{$info.email}"{/notempty}>
        </div>
    </div>
    <!--手机区号-->
    <div class="layui-form-item">
        <label class="layui-form-label">微信</label>
        <div class="layui-input-block" style="max-width:300px;">
            <input name="wechat" lay-verify="wechat" autocomplete="off" placeholder="请输入微信" class="layui-input" type="text" {notempty name="$info.wechat"}value="{$info.wechat}"{/notempty}>
        </div>
    </div>
    <!--手机区号-->
    <div class="layui-form-item">
        <label class="layui-form-label">报名人数</label>
        <div class="layui-input-block" style="max-width:300px;">
            <input name="people_num" lay-verify="people_num" readonly autocomplete="off" placeholder="请输入报名人数" class="layui-input" type="number" {notempty name="$info.people_num"}value="{$info.people_num}"{/notempty}>
        </div>
    </div>

    {notempty name="$info"}
    <input type="hidden" name="id" value="{$info.id}">
    {/notempty}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="admin">保存</button>
        </div>
    </div>
</form>
<script src="__PUBLIC__/layui/layui.js"></script>
<script src="__PUBLIC__/jquery/jquery.min.js"></script>
<script>
    layui.use(['layer', 'form'], function() {
        var layer = layui.layer,
            $ = layui.jquery,
            form = layui.form;
        $(window).on('load', function() {
            form.on('submit(admin)', function(data) {
                $.ajax({
                    url:"{:url('admin/grouptoursline/freegroupmemberinfo')}",
                    data:$('#admin').serialize(),
                    type:'post',
                    async: false,
                    success:function(res) {
                        if(res.code > 0) {
                            layer.msg(res.msg);
                            setTimeout(function(){
                                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(index); //再执行关闭
                            },1000)
                        } else {
                            layer.msg(res.msg);
                        }
                    }
                })
                return false;
            });
        });
        $(".showMember").click(function(){
            var url = $(this).attr('href');
            layer.open({
                type:2,
                content:url,
                area: ['40%', '80%'],
                end:function(){
                    location.reload();
                }
            });
            return false;
        })
        $('.editmemberinfo').click(function(){
            var url = $(this).attr('href');
            layer.open({
                type:2,
                content:url,
                area: ['80%', '80%'],
                end:function(){
                    location.reload();
                }
            });
            return false;
        })
    })
</script>
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    //拼团详情暂时隐藏
    $(function(){
        // var ue2 = UE.getEditor('desc',{
        //     initialFrameHeight: 100,
        //     initialFrameWidth: 600,
        //     toolbars:[
        //         [ 'source'],
        //         ['bold', 'italic', 'underline', 'fontborder', 'strikethrough']
        //     ]
        // });
    })
</script>
</body>
</html>
